<?php
namespace M\Action;
class SoAction extends BaseAction{
public function _initialize()
{
parent::_initialize();
$this->_userdomain=str_replace('/index.php/m','',C('yh_headerm_html'));
$this->_userappkey=trim(C('yh_gongju'));
$this->_pcdomain=C('yh_site_url');
$this->_avatar=C('yh_site_zhibo');
}

public function index(){
	
$this->assign('status','yes');
$text = I('key','','trim');

if(!empty($text)){
$this->assign('key',$text);
 $url=$this->tqkapi."/so";
 $data=array(
 'key'=>$this->_userappkey,
 'time'=>time(),
 'tqk_uid'=>	$this->tqkuid,
 'k'=>$text,
// 'pid'=>$this->agent_pid()
 );

 $data=$this->_curl($url,$data,true); 
 
 $result=json_decode($data,true);  
if($result['status']=='1'){
$this->assign('list',$result['result']);	
}else{
$this->assign('status','no');	
}
$result='yes';
$this->assign('result','yes');
 
}

if($this->_avatar){
$this->assign('avatar',$this->_avatar);	
}else{
$this->assign('avatar','/Public/static/images/default_photo.gif');	
}
$this->display();

}








}




?>